import com.sun.jdi.IntegerType;

import java.util.function.Function;

public class FunctionDemo2 {
    public static void main(String[] args) {
        convert("Jack,21",s->s.split(",")[1], Integer::parseInt, i-> i + 80);
    }
    private static void convert(String s, Function<String,String>fun1,Function<String,Integer>fun2,Function<Integer,Integer>fun3){
        System.out.println( fun1.andThen(fun2).andThen(fun3).apply(s));
    }
}
